package com.atguigu.spzx.manager.controller;

import com.atguigu.spzx.manager.service.ShoppingCartService;
import com.atguigu.spzx.model.vo.common.Result;
import com.atguigu.spzx.model.vo.common.ResultCodeEnum;
import com.atguigu.spzx.model.vo.sell.SellVo;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.atguigu.spzx.model.dto.sell.sellDto;

import java.util.List;

@Tag(name = "购物车接口")
@RestController
@RequestMapping(value = "/home")
public class ShoppingCartController {

    @Autowired
    private ShoppingCartService shoppingCartService;

    @PostMapping("/selldetails/{id}/incart")
    public Result InCart(@RequestBody sellDto selldto){
        shoppingCartService.InCart(selldto);
        return Result.build(null, ResultCodeEnum.SUCCESS);
    }

}
